// Copyright 2009 Pigasus.
// GNU GPL v2.
// Author: John Zhang and Jordan Rupprecht.
//
// The Servers class. This manages server connections/logins/etc.

#ifndef SERVERS_H_
#define SERVERS_H_

#include "pigasus-types.h"

using namespace std;

// Server class
class Servers {
  // List of servers. This is a List of Maps, where each Map looks something
  // like ["host" => "hostname.com", "user" => "mylogin"]
  List *servers;
  vector<bool> has_password;
  
  // Index used for round-robin scheduling
  int next_server_index;
 
 public:
  // Constructor.
  Servers();
  // Destructor.
  ~Servers();
  // Copy constructor
  Servers(const Servers& s);
  // Clone method
  Servers* Clone();
  // Declare servers with a List
  void SetServers(List &servers_);
  // Get the next server to use
  Map *GetNextServer();
};

#endif  // SERVERS_H_
